package com.glsc.ngateway.common.base.repo.postgre6;

import com.glsc.ngateway.common.base.domain.postgre6.GtjaIRS;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public interface GtjaIRSRepo extends JpaRepository<GtjaIRS, GtjaIRS.PK>, JpaSpecificationExecutor<GtjaIRS> {

    @Transactional(rollbackFor = Exception.class)
    @Modifying
    @Query(value = "delete from glsc_data.t_excel_irs_gtja_ydccmxb where ywyf = :ywyf",nativeQuery = true)
    void delete(@Param("ywyf") String ywyf);
}
